import service from '@/utils/request';

const VillageApi = {
  // ----------------小区管理--------------
  listVillage: function (data) {
    return service.get('village/page', { params: data });
  },
  addVillage: function (data) {
    return service.post('village', data);
  },
  editVillage: function (data) {
    return service.put('village', data);
  },
  deleteVillage: function (data) {
    return service.put('village/delete', data);
  },
  getVillageInfo: function (data) {
    return service.get('village', { params: data });
  },
  villageList(data) {
    // 获取街道下的小区
    return service.get('village/listIdName', { params: data });
  },
  statisticsUser(data) {
    // 获取街道下的小区
    return service.get('village/statisticsUser', { params: data });
  },
  createWxUrl(data) {
    // 获取街道下的小区
    return service.put('village/createWxUrl', data);
  },
  importResidentFile(data) {
    return service.get('beeper/importUserAddressByBeeper', { params: data });
  },
  addPerfectData(data) {
    return service.post('temporaryData', data);
  },
  editPerfectData(data) {
    return service.put('temporaryData', data);
  },
  getPerfectData(data) {
    return service.get('temporaryData', { params: data });
  },
  getBusinessData(data) {
    return service.get('villageBusinessTemp/list', { params: data });
  },
  addBusinessData(data) {
    return service.post('villageBusinessTemp/batchInsert',data);
  },
  editBusinessData(data) {
    return service.put('villageBusinessTemp', data);
  },
};

export default VillageApi;
